﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Airplane
{
    public partial class TrangChu1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
    
                if (rbMotChieu.Checked)
                {
                    txtNgayVe.Visible = false;
                    Session["LoaiVe"] = "MotChieu";
                }
            if(rbKhuHoi.Checked)
            {
                txtNgayVe.Visible=true;
                Session["LoaiVe"] = "KhuHoi";
            }
            if (rbMotChang.Checked)
            {
                txtNgayVe.Visible = false;
                Session["LoaiVe"] = "MotChang";
            }
            
        }

        protected void btnTimChuyenBay_Click(object sender, EventArgs e)
        {
            Session["SanBayDi"] = ddlSanBayDi.SelectedItem;
            Session["SanBayDen"] = ddlSanBayDen.SelectedItem;
            Session["NgayDi"] = "";
            if(txtNgayDi.Text!="")
                Session["NgayDi"] = txtNgayDi.Text;
            Session["NgayVe"] = "";
            if (txtNgayVe.Text != "")
            {
                Session["NgayVe"] = txtNgayVe.Text;
            }
            Session["NguoiLon"] = ddlNguoiLon.SelectedValue;
            Session["TreEm"] = ddlTreEm.SelectedValue;
            Session["EmBe"] = ddlEmBe.SelectedValue;
            Session["HangVe"] = ddlHangVe.SelectedValue;
            Response.Redirect("DatVe.aspx");
        }
     
    }
}